<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/11/9
  Time: 18:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="icon" href="${pageContext.request.contextPath}/assets/images/favicon.png" type="image/png">
    <link href="${pageContext.request.contextPath}/assets/css/icons.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/style.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/responsive.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/update.css">
    <style>
        .form-group label {
            padding-right: 0;
        }

        label {
            font-size: 16px;
        }

        .form-group input {
            border-radius: 8px;
        }

        .text-body2 .form-group {
            margin-top: 10px;
        }

        .form-group .inputPic {
            width: 100%;
        }
    </style>
</head>
<body>
<%@include file="../inc/left.jsp" %>
<div class="main-content">
    <%@include file="../inc/header.jsp" %>
    <div class="text-body">
        <div class="text-body1">
            <div class="text-body2">
                <form class="form-horizontal" action="${pageContext.request.contextPath}/sell/edit" method="post" >
                    <input name="id" style="display: none">
                    <div class="form-group">
                        <label for="inputPassword" class="col-sm-3 control-label">优惠券类型</label>
                        <div class="col-sm-6">
                            <select id="inputPassword" name="type" class="form-control">
                                <option value="0" >全场赠券</option>
                                <option value="1">会员赠券</option>
                                <option value="2">购物赠券</option>
                                <option value="3">注册赠券</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputName" class="col-sm-3 control-label">优惠券名称</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="inputName" name="name" value="${coupon.name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword" class="col-sm-3 control-label">适用平台</label>
                        <div class="col-sm-6">
                            <select id="inputPassword" name="platform" class="form-control">
                                <option value="0" >全平台</option>
                                <option value="1">移动平台</option>
                                <option value="2">PC平台</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword" class="col-sm-3 control-label">可使用商品</label>
                        <div class="col-sm-6">
                            <select id="inputPassword" name="useType" class="form-control">
                                <option value="0" >全场通用</option>
                                <option value="1">指定分类</option>
                                <option value="2">指定商品</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputName" class="col-sm-3 control-label">总发行量</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="inputName" name="count" value="${coupon.count}" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputName" class="col-sm-3 control-label">面额</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="inputName" name="amount" value="${coupon.amount}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputName" class="col-sm-3 control-label">每人限领</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="inputName" name="perLimit" value="${coupon.perLimit}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputName" class="col-sm-3 control-label">使用门槛</label>

                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="inputName" name="minPoint" value="${coupon.minPoint}">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="inputStartTime" class="col-sm-3 control-label">领取日期</label>
                        <div class="col-sm-6">
                            <input type="date" class="form-control" id="inputStartTime" name="enableTime" placeholder="开始时间" value='<fmt:formatDate value="${coupon.enableTime}" pattern="yyyy-MM-dd"/>'>
                        </div>
                    </div>
                    <div class="form-group" >
                        <span>至</span>
                        <label for="inputEndTime" class="col-sm-3 control-label" id="inputEndTime">有效期</label>

                        <div class="col-sm-4">
                            <input type="date"  class="form-control" id="inputEndTime" name="startTime"value='<fmt:formatDate value="${coupon.startTime}" pattern="yyyy-MM-dd"/>'>
                        </div>

                        <div class="col-sm-4">
                            <input type="date"  class="form-control" id="inputEndTime" name="endTime" value='<fmt:formatDate value="${coupon.endTime}" pattern="yyyy-MM-dd"/>'>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="note" class="col-sm-3 control-label">备注</label>
                        <div class="col-sm-6">
                            <textarea id="note" name="note" class="form-control" placeholder="请输入内容" value="${coupon.note}"></textarea>
                        </div>
                    </div>

                    <div class="col-sm-offset-3">
                        <button class="btn-primary btn-button " style="margin-right: 20px">提交</button>

                    </div>
                </form>
                <a href="${pageContext.request.contextPath}/sell/coupon_restart"><button class="btn-button1">重置</button></a>
            </div>
        </div>


    </div>

</div>

</body>
<script>

</script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/plugins/moment/moment.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.slimscroll.js "></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.nicescroll.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/functions.js"></script>
</html>
